package com.heima.user.client;

import com.heima.feign.user.IUserClient;
import com.heima.model.apuser.dtos.AuthDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.user.service.ApUserRealnameService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author rookie001
 * @creat 2023-06-20-14:17
 */
@RestController
@Slf4j
public class UserClient implements IUserClient {
    @Autowired
    private ApUserRealnameService apUserRealnameService;

    //查询
    @PostMapping("/api/v1/auth/list")
    public ResponseResult list(@RequestBody AuthDto dto) {
        return apUserRealnameService.listUser(dto);
    }

    //审核通过
    @PostMapping("/api/v1/auth/authPass")
    public ResponseResult authPass(@RequestBody AuthDto dto) {
        return apUserRealnameService.authPass(dto);
    }
}
